package com.gm.cards.domain;

public enum Suit {
    CLUBS(4), HEARTS(3), SPADES(2), DIAMONDS(1);

    private int weight;

    private Suit(int weight) {
	this.weight = weight;
    }

    public int getWeight() {
	return this.weight;
    }

    public static Suit valueOf(int value) {
	switch (value) {
	case 4:
	    return CLUBS;
	case 3:
	    return HEARTS;
	case 2:
	    return SPADES;
	case 1:
	    return DIAMONDS;
	default:
	    return null;
	}
    }
}
